import HttpRequest from '../network/HttpRequestTest';

export function fakeAccountLogin(params) {
  return HttpRequest({
    url: 'api/user/v1/account/login',
    method: 'POST',
    data: params,
    getResponse: true,
    encryption: true,
  });
}

export async function queryUserInfo() {
  return HttpRequest({
    url: '/api/oa/v1/employee/getuserinfo',
    method: 'GET',
    params: {
      t: +new Date(),
    },
  });
}

export async function getPersonalPortrait() {
  return HttpRequest('/api/oa/v1/employee/getuseravatar', {
    method: 'GET',
    params: {
      t: +new Date(),
    },
  });
}

export async function getEmployeeinfo(params = {}) {
  return HttpRequest('/api/oa/v1/employee/getemployeeinfo', {
    method: 'POST',
    data: params,
  });
}

export async function getWorkingDays(params = {}) {
  return HttpRequest('/api/oa/v1/self/settings/workingDays', {
    method: 'POST',
    data: params,
  });
}
export async function getmyattendancedetail(params = {}) {
  return HttpRequest('/api/oa/v1/myattendance/common/sign', {
    method: 'POST',
    data: params,
  });
}

export async function getmyattendancerecord(params = {}) {
  return HttpRequest('/api/oa/v1/myattendance/getmyattendancerecord', {
    method: 'POST',
    data: params,
  });
}
